﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000E5 RID: 229
	[Serializable]
	public class BloomModel : PostProcessingModel
	{
		// Token: 0x170000C0 RID: 192
		// (get) Token: 0x060004C0 RID: 1216 RVA: 0x000272A1 File Offset: 0x000254A1
		// (set) Token: 0x060004C1 RID: 1217 RVA: 0x000272A9 File Offset: 0x000254A9
		public BloomModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x060004C2 RID: 1218 RVA: 0x000272B2 File Offset: 0x000254B2
		public override void Reset()
		{
			this.m_Settings = BloomModel.Settings.defaultSettings;
		}

		// Token: 0x04000689 RID: 1673
		[SerializeField]
		private BloomModel.Settings m_Settings = BloomModel.Settings.defaultSettings;

		// Token: 0x020000E6 RID: 230
		[Serializable]
		public struct BloomSettings
		{
			// Token: 0x170000C1 RID: 193
			// (get) Token: 0x060004C4 RID: 1220 RVA: 0x000272CD File Offset: 0x000254CD
			// (set) Token: 0x060004C3 RID: 1219 RVA: 0x000272BF File Offset: 0x000254BF
			public float thresholdLinear
			{
				get
				{
					return Mathf.GammaToLinearSpace(this.threshold);
				}
				set
				{
					this.threshold = Mathf.LinearToGammaSpace(value);
				}
			}

			// Token: 0x170000C2 RID: 194
			// (get) Token: 0x060004C5 RID: 1221 RVA: 0x000272DC File Offset: 0x000254DC
			public static BloomModel.BloomSettings defaultSettings
			{
				get
				{
					return new BloomModel.BloomSettings
					{
						intensity = 0.5f,
						threshold = 1.1f,
						softKnee = 0.5f,
						radius = 4f,
						antiFlicker = false
					};
				}
			}

			// Token: 0x0400068A RID: 1674
			[Tooltip("Strength of the bloom filter.")]
			[Min(0f)]
			public float intensity;

			// Token: 0x0400068B RID: 1675
			[Tooltip("Filters out pixels under this level of brightness.")]
			[Min(0f)]
			public float threshold;

			// Token: 0x0400068C RID: 1676
			[Tooltip("Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).")]
			[Range(0f, 1f)]
			public float softKnee;

			// Token: 0x0400068D RID: 1677
			[Tooltip("Changes extent of veiling effects in a screen resolution-independent fashion.")]
			[Range(1f, 7f)]
			public float radius;

			// Token: 0x0400068E RID: 1678
			[Tooltip("Reduces flashing noise with an additional filter.")]
			public bool antiFlicker;
		}

		// Token: 0x020000E7 RID: 231
		[Serializable]
		public struct LensDirtSettings
		{
			// Token: 0x170000C3 RID: 195
			// (get) Token: 0x060004C6 RID: 1222 RVA: 0x0002732C File Offset: 0x0002552C
			public static BloomModel.LensDirtSettings defaultSettings
			{
				get
				{
					return new BloomModel.LensDirtSettings
					{
						texture = null,
						intensity = 3f
					};
				}
			}

			// Token: 0x0400068F RID: 1679
			[Tooltip("Dirtiness texture to add smudges or dust to the lens.")]
			public Texture texture;

			// Token: 0x04000690 RID: 1680
			[Tooltip("Amount of lens dirtiness.")]
			[Min(0f)]
			public float intensity;
		}

		// Token: 0x020000E8 RID: 232
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000C4 RID: 196
			// (get) Token: 0x060004C7 RID: 1223 RVA: 0x00027358 File Offset: 0x00025558
			public static BloomModel.Settings defaultSettings
			{
				get
				{
					return new BloomModel.Settings
					{
						bloom = BloomModel.BloomSettings.defaultSettings,
						lensDirt = BloomModel.LensDirtSettings.defaultSettings
					};
				}
			}

			// Token: 0x04000691 RID: 1681
			public BloomModel.BloomSettings bloom;

			// Token: 0x04000692 RID: 1682
			public BloomModel.LensDirtSettings lensDirt;
		}
	}
}
